# coding=utf-8

from public.common import basepage


class BaiduIndexPage(basepage.Page):

    def into_baidu_page(self, url):
        """打开百度首页"""
        # self.dr.open('http://www.4399.com')
        self.dr.open(url)

    def click_delu_link(self):
        self.dr.click_text('登录')

    def input_username(self,loc, values):
        """输入搜索关键词"""
        self.dr.clear_type(loc, values)

    def click_search_button(self):
        """点击搜索按钮"""
        self.dr.click('')

    def return_title(self):
        """返回该页面的title"""
        return self.dr.get_title()

